#include <iostream>

using namespace std;

const int N = 1e3 + 10;
int f[N][N];
int n, m, c;

int main()
{
	cin >> n >> m >> c;
	for(int i = 1; i <= n; i++)
	{
		for(int j = 1; j <= m; j++)
		{
			int x; cin >> x;
			f[i][j] = f[i - 1][j] + f[i][j - 1] - f[i - 1][j - 1] + x;
		}
	}
	int ret = -0x3f3f3f3f;
	int x, y;
	for(int x1 = 1; x1 + c - 1 <= n; x1++)
	{
		for(int y1 = 1; y1 - 1 + c <= n; y1++)
		{
			int x2 = x1 + c - 1;
			int y2 = y1 - 1 + c;
			int t = f[x2][y2] - f[x1 - 1][y2] - f[x2][y1 - 1] + f[x1 - 1][y1 - 1];
			
			if(t > ret)
			{
				x = x1; y = y1;
				ret = t;
			}
		}
	}
	cout << x << " " << y << endl;
	return 0;
}
